package cn.gzsxt.query;


//用户参数对象,用于封装用户提交的参数:条件参数,页码参数等等
public class PageQueryObject {
	private Integer currentPage = 1;//当前页,默认第一页,用户肯定会翻页
	private Integer pageSize = 10; //每页条数,默认等于10 ,用户可能会自己指定页面
	private String keyword = ""; // 关键字默认是空字符串
	
	
	
	//计算起始索引
	public Integer getBeginIdex(){
		return (this.currentPage - 1) * this.pageSize;
	}
	
	
	public Integer getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}


	public String getKeyword() {
		return keyword;
	}


	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}


	@Override
	public String toString() {
		return "SysUserQueryObject [currentPage=" + currentPage + ", pageSize="
				+ pageSize + ", keyword=" + keyword + "]";
	}
	
}
